package com.imaker.field;

 /**
 * <p>程序名称：       Field.java</p>
 * <p>程序说明：       TODO</p>
 * <p>版权信息：       Copyright mayonghua</p>
 * <p>时间：          Oct 25, 2010 2:25:42 PM</p>	
 * 
 * @author：          mayonghua
 * @version：         Ver 0.1
 */

public class StaticField {

	public static String error = "ERROR";//执行失败
	public static String success = "SUCCESS";//执行成功
	public static String userSuccess = "USERSUCCESS";//用户请求成功转向
	public static String userError = "USERERROR";//用户请求失败转向
	public static String error404 = "404";//404错误
	public static String error500="500";//500错误
	
//	查找导航栏
	public static String NaviAllFindHql = "from Navigation n  order by n.sortIndex";
	public static String NaviRootFindHql = "from Navigation n  where n.pid = '00000000000000000000000000000000' order by n.sortIndex";
	public static String ChildNaviFindHql = "from Navigation n where n.pid = ? order by n.sortIndex";
//	分页查找导航栏
	public static String NaivagtionByPage = "from Navigation n where n.pid = ?";

//	查找Code长度为2的导航栏条目，即为根节点(未使用该方式)
	public static String NavCodeLenHql = "from Navigation n where len(n.code)==? order by n.createDate desc";

//	根据模块查询该模块下面的内容信息
	public static String ArticleAllByModules = "from ArticleInfo i where i.modulesInfo.id = ? order by i.sortIndex";
//	查询全部的Article信息
	public static String ArticleAllFindHql = "from ArticleInfo i order by i.sortIndex";
//	分页查询内容信息
	public static String ArticleByPage = "from ArticleInfo a where a.modulesInfo.id = ?";
	
	
//	根据模块查询该模块下面的图片信息
	public static String PicAllByModules = "from PicInfo p where p.modules.id = ? order by p.sortIndex";
//	根据图片的类型查询图片
	public static String picAllByType = "from PicInfo p where p.picType.id = ? order by p.sortIndex";
	
	
//	根据模块的类型（左，中，右）查询模块信息
	public static String ModulesByType = "from ModulesInfo m where m.position = ? order by m.sortIndex";
//	根据模块的内容类型（新闻，产品）查询模块信息
	public static String ModulesByContentType = "from ModulesInfo m where m.modulesType.name = ? order by m.sortIndex";
//	根据模块类型查询模块信息
	public static String ModulesByPage = "from ModulesInfo m where m.modulesType.id = ? ";
//	分页查询所有的模块信息
	public static String ModulesByPageAll = "from ModulesInfo m ";
	
//	查询产品的信息，根据模块类型
	public static String ProductByModulesType = "from ProductInfo p where p.modulesInfo.id = ? order by p.sortIndex";
//	分页查询产品信息
	public static String ProductByPage = "from ProductInfo p where p.modulesInfo.id = ?";
	
	
//	分页根据页面查询模块
	public static String ModulesByPageInfo = "from PageModulesInfo pm where pm.pageInfo.id = ?";
	
//	分页查找模块类型
	public static String ModulesTypeByPage = "from ModulesTypeInfo m";
	
//	分页查询模块样式
	public static String ModulesStyleByPage = "from ModulesStyleInfo m";
	
//	查询页面-模块-样式对应信息
	public static String PageModulesStyleByPage = "from PageModulesStyleInfo m where m.pageInfo.id = ? order by m.sortIndex";
}
